<template>
  <div class="app-container">



    <Exceltpl ref="exceltpl"></Exceltpl>

    <el-drawer
      :visible.sync="action"
      direction="rtl"
      title="留言操作"
      size="70%"
      class="drawer"
    >
      <div v-loading="actionloading" style="padding:0 30px;min-height:70vh">
        <div v-if="actionData.wid">
          <div class="titleH">
            <a class="title" :href="`https://wz.mala.cn/wz/wzinfo?wid=${actionData.wid}`" target="_blank"><i
              class="el-icon-link"
            ></i> {{ actionData.title }}</a>
          </div>
          <el-descriptions class="margin-top" :column="3" border style="margin-top:20px;">
            <el-descriptions-item>
              <template slot="label">
                <i class="el-icon-user"></i>
                发帖人
              </template>
              {{ actionData.u_name }}（{{ actionData.come_from }}）
            </el-descriptions-item>
            <el-descriptions-item>
              <template slot="label">
                <i class="el-icon-time"></i>
                时间
              </template>
              {{ actionData.create_time }}
            </el-descriptions-item>
            <el-descriptions-item>
              <template slot="label">
                <i class="el-icon-mobile-phone"></i>
                手机
              </template>
              <el-button type="primary" icon="el-icon-phone" round size="mini" v-if="actionData.phone=='-'" @click="lookPhone('thread',actionData.wid)">
                查看手机</el-button>
              <span v-else>{{actionData.phone}}</span>

            </el-descriptions-item>
            <el-descriptions-item>
              <template slot="label">
                <i class="el-icon-time"></i>
                ip
              </template>
              <el-button type="primary" icon="el-icon-view" round size="mini" v-if="hidden.ip" @click="lookIp('thread',actionData.wid)">
                查看IP</el-button>
              <span v-else>{{actionData.ip}}</span>
            </el-descriptions-item>
            <el-descriptions-item v-if="actionData.address">
              <template slot="label">
                <i class="el-icon-office-building"></i>
                精确地址
              </template>
              {{ actionData.address }}
            </el-descriptions-item>
            <el-descriptions-item v-if="actionData.quhua_id">
              <template slot="label">
                <i class="el-icon-office-building"></i>
                快速定位
              </template>
              {{ actionData.quhua_id }}
            </el-descriptions-item>
            <el-descriptions-item>
              <template slot="label">
                <i class="el-icon-tickets"></i>
                当前状态
              </template>
              <el-select v-model="actionform.status" placeholder="请选择该留言状态" @change="updateParms('status')"
                         v-loading="value_loading.status"
              >
                <el-option :label="item" :value="idx" v-for="(item,idx) in  actionData.statusAry"></el-option>
              </el-select>
            </el-descriptions-item>


            <el-descriptions-item>
              <template slot="label">
                <i class="el-icon-mobile-phone"></i>
                标记不导出
              </template>
              <el-switch v-model="actionform.export_status" v-loading="value_loading.export_status"
                         @change="updateParms('export_status')"
              ></el-switch>
              <div v-if="actionData.export_status_reason && actionData.export_status==1" style="font-size:12px;color:#666;margin-top:5px;">{{actionData.export_status_reason}}</div>
            </el-descriptions-item>

            <el-descriptions-item>
              <template slot="label">
                <i class="el-icon-mobile-phone"></i>
                不统计满意度
              </template>
              <el-switch v-model="actionform.myd_status" v-loading="value_loading.myd_status"
                         @change="updateParms('myd_status')"
              ></el-switch>
            </el-descriptions-item>

            <el-descriptions-item>
              <template slot="label">
                <i class="el-icon-mobile-phone"></i>
                手机是否公开
              </template>
              <el-switch v-model="actionform.is_zhanshi" v-loading="value_loading.is_zhanshi" :active-value="1" :inactive-value="2"
                         @change="updateParms('is_zhanshi')"
              ></el-switch>
            </el-descriptions-item>
            <el-descriptions-item>
              <template slot="label">
                <i class="el-icon-mobile-phone"></i>
                仅作者和单位可见
              </template>
              <el-switch v-model="actionform.bkj_status" v-loading="value_loading.bkj_status"
                         @change="updateParms('bkj_status')"
              ></el-switch>
            </el-descriptions-item>


            <el-descriptions-item>
              <template slot="label">
                <i class="el-icon-time"></i>
                截止时间
              </template>
              <el-date-picker
                v-loading="value_loading.endTime"
                v-model="actionform.endTime"
                type="datetime"
                @change="setEndTime"
                value-format="yyyy-MM-dd HH:mm:ss"
                placeholder="选择过期截止时间"
              >
              </el-date-picker>
            </el-descriptions-item>


          </el-descriptions>
          <div style="margin-top:15px;">
              <el-cascader :options="baseData.leaderInfo" class="filter-item" style="width:250px" clearable filterable
                           placeholder="选择分类" :props="{ expandTrigger: 'hover', checkStrictly: true }" v-model="actionform.leader"
              ></el-cascader>
              <el-button type="primary" size="small" style="margin-left:10px;" @click="actionLeader()">
                确认分类</el-button>
          </div>
          <el-collapse style="margin-top:10px;" v-model="activeNames">
            <el-collapse-item name="1">
              <template slot="title">
                <div style="font-weight: bold;">留言正文内容</div>
              </template>
              <div>
                <div v-html="actionData.content" class="wzdataContent" ref="ContentBox">
                </div>
                <div v-if="actionData.remark" class="remark">
                  备注：{{actionData.remark}}
                </div>
                <div v-if="actionData.reply && actionData.reply.length>0" class="reply">
                  <div :class="['reply-item',item.delete_time>0?'delete_item':'']"
                       v-for="(item,idx) in actionData.reply"
                  >

                    <div class="headerLine">
                      <div class="reply-user">
                      <span class="user">
                        <span v-if="item.delete_time>0" class="delete">已删除</span>
                           {{ item.user_name || item.user_verify }}
                      </span>
                        <span class="t">{{ item.create_time }}</span>
                      </div>
                      <el-popconfirm
                        :title="`确认删除这个回复吗？删除后可恢复`"
                        class="actionButton"
                        placement="top-end"
                        v-if="item.delete_time==0"
                        @confirm="delReply(item.id,1,actionData.wid)"
                      >
                        <span slot="reference">删除</span>
                      </el-popconfirm>
                      <el-popconfirm
                        :title="`确认恢复这个回复吗？？`"
                        class="actionButton"
                        placement="top-end"
                        v-if="item.delete_time>0"
                        @confirm="delReply(item.id,2,actionData.wid)"
                      >
                        <span slot="reference">恢复</span>
                      </el-popconfirm>
                    </div>

                    <div v-html="item.l_reply" style="padding-top:5px;color:#666;"></div>
                  </div>
                </div>
              </div>
            </el-collapse-item>
            <el-collapse-item name="2" v-if="actionData.image &&actionData.image.length">
              <template slot="title">
                <div style="font-weight: bold;">留言图片</div>
              </template>
              <div class="image__preview">
                <el-image
                  style="width: 100px; height: 100px;object-fit: cover;margin-right:10px;"
                  :src="item"
                  v-for="(item,idx) in actionData.image"
                  :preview-src-list="actionData.image"
                >
                </el-image>
              </div>
            </el-collapse-item>
          </el-collapse>
        </div>
      </div>
    </el-drawer>
    <div class="filter-container" v-if="baseData" style="overflow-y: auto">
      <div v-if="!hide">
      <div>
        <el-cascader :options="baseData.ly" class="filter-item w-200" clearable filterable placeholder="选择领域"
                     :props="{ expandTrigger: 'hover' }" v-model="listQuery.c2"
        ></el-cascader>
        <el-select v-model="listQuery.type" class="filter-item w-200" placeholder="请选择类别" clearable>
          <el-option
            v-for="item in baseData.type"
            :key="item.value"
            :label="item.label"
            :value="item.value"
          >
          </el-option>
        </el-select>
        <el-date-picker
          v-model="listQuery.checktime"
          type="daterange"
          range-separator="至"
          class="filter-item"
          style="width:300px"
          start-placeholder="开始日期"
          end-placeholder="结束日期"
        >
        </el-date-picker>
        <el-cascader :options="baseData.leaderInfo" class="filter-item w-200" style="width:300px" clearable filterable
                     placeholder="选择责任人" :props="{ expandTrigger: 'hover', checkStrictly: true }" v-model="listQuery.leader"
        ></el-cascader>
        <el-select v-model="listQuery.status" class="filter-item w-200" placeholder="请选择状态" clearable>
          <el-option
            v-for="item in baseData.statusAry"
            :key="item.value"
            :label="item.label"
            :value="item.value"
          >
          </el-option>
        </el-select>

        <el-select v-model="listQuery.evaluate_all" class="filter-item w-200" placeholder="评分筛选" clearable>
          <el-option
            v-for="item in [1,2,3,4,5,'>2','>3','>4','<=2']"
            :key="item"
            :label="item"
            :value="item"
          >
          </el-option>
        </el-select>
        <el-select v-model="listQuery.come_from" class="filter-item w-200" placeholder="选择来源" clearable >
          <el-option
            v-for="item in come_from_ary"
            :key="item.value"
            :label="item.label"
            :value="item.value"
          >
          </el-option>
        </el-select>
      </div>
      <div style="border-top:1px solid #eee;padding-top:10px;">
        <el-input
          v-model="listQuery.keyword"
          size="small"
          placeholder="请输入标题"
          clearable
          style="width:350px;"
          class="filter-item w-200"
        />

        <el-input
          v-model="listQuery.phone"
          size="small"
          placeholder="请输入手机"
          clearable
          class="filter-item w-200"
        />
        <el-input
          v-model="listQuery.wid"
          size="small"
          placeholder="请输入留言WID"
          clearable
          class="filter-item w-200"
        />
        <el-input
          v-model="listQuery.u_name"
          size="small"
          placeholder="请输入发帖用户名"
          clearable
          class="filter-item w-200"
        />
        <el-input
          v-model="listQuery.u_uid"
          size="small"
          placeholder="请输入发帖用户id"
          clearable
          class="filter-item w-200"
        />
        <el-input
          v-model="listQuery.r_name"
          size="small"
          placeholder="回复机构用户名"
          clearable
          class="filter-item w-200"
        />

      </div>
      </div>
      <el-button-group class="filter-item">
        <el-button
          size="small"
          type="primary"
          icon="el-icon-search"
          @click="search"
        >
          搜索
        </el-button>
        <el-button
          size="small"
          type="primary"
          icon="el-icon-refresh"
          @click="refresh"
        >
          重置
        </el-button>
        <el-button
          size="small"
          type="primary"
          icon="el-icon-paperclip"
          @click="explortExcel"
        >
          导出
        </el-button>

        <el-button
          class="hidefilter"
          size="small"
          type="primary"
          @click="hidefilter"
        >
          {{hide==true?"展开":"收起"}}
        </el-button>

      </el-button-group>
    </div>

    <el-table
      v-loading="listLoading"
      :data="list"
      element-loading-text="Loading"
      border
      fit
      height="100%"
      class="table-container"
      highlight-current-row
      @sort-change="sortChange"
    >

      <el-table-column
        width="80"
        label="wid"
        align="center"
      >
        <template slot-scope="scope">
          {{ scope.row.wid }}
        </template>
      </el-table-column>


      <el-table-column
        width="80"
        label="状态"
        align="center"
      >
        <template slot-scope="scope">
          <el-tag v-if="scope.row.status==7" type="warning">已受理</el-tag>
          <el-tag v-else-if="scope.row.status==2" type="info">待处理</el-tag>
          <el-tag v-else-if="scope.row.status==3 || scope.row.status==4 || scope.row.status==5" type="success">已办理
          </el-tag>
        </template>
      </el-table-column>

      <el-table-column
        width="360"
        label="标题"
        align="left"
      >
        <template slot-scope="scope">
          <div style="color:#409EFF;font-size:14px;cursor: pointer" @click="openAction(scope.row.wid)">
            {{ scope.row.title }}
          </div>
          <div style="display: flex;align-items: center">
            <div v-for="(item,idx) in scope.row.lingyu" class="titletag">
              {{ item }}
            </div>
          </div>
        </template>
      </el-table-column>



      <el-table-column
        width="60"
        label="评分"
        align="center"
      >
        <template slot-scope="scope">
          {{scope.row.evaluate_all||'-'}}
        </template>
      </el-table-column>
      <el-table-column
        width="180"
        label="负责人"
        align="center"
      >
        <template slot-scope="scope">
          <div style="font-size:12px">{{ scope.row.lid }}</div>
          <div v-if="scope.row.passon_name" class="cover"><p style="margin:0;padding:0">{{ scope.row.passon_time }}</p><p  style="margin:0;padding:0">@{{ scope.row.passon_name }}</p></div>
        </template>
      </el-table-column>

      <el-table-column
        width="135"
        label="发帖时间"
        align="center"
        prop="create_time"
        :sort-orders = "['descending','ascending','null']"
        :sortable="'custom'"
      >
        <template slot-scope="scope">
          <div style="font-size:12px">{{ scope.row.create_time }}</div>
        </template>
      </el-table-column>
      <el-table-column
        width="135"
        label="截止时间"
        prop="endTime"
        :sort-orders = "['descending','ascending','null']"
        :sortable="'custom'"
        align="center"
      >
        <template slot-scope="scope">
          <div style="font-size:12px">{{ scope.row.endTime }}</div>
        </template>
      </el-table-column>
      <el-table-column
        width="180"
        label="发帖人"
        align="center"
      >
        <template slot-scope="scope">
          <div style="font-size:12px">{{ scope.row.u_name }}({{ scope.row.come_from }})</div>
        </template>
      </el-table-column>

      <el-table-column
        width="135"
        label="回复时间"
        align="center"
        prop="reply_time"
        :sort-orders = "['descending','ascending','null']"
        :sortable="'custom'"
      >
        <template slot-scope="scope">
          <div style="font-size:12px">{{ scope.row.reply_time }}</div>
        </template>
      </el-table-column>
      <el-table-column
        label="更多信息"
        width="135"
        align="center"
        v-if="this.roles!='tongji'"
      >
        <template slot-scope="scope">
          <el-button
            type="danger"
            icon="el-icon-more"
            size="mini"
            @click="goWid(scope.row.wid)"
          />
        </template>
      </el-table-column>
    </el-table>


    <pagination
      v-show="total > 0"
      :total="total"
      :page.sync="listQuery.page"
      :limit.sync="listQuery.limit"
      @pagination="fetchData"
    />

  </div>
</template>
<style lang="less">
.remark{
  background: rgba(22, 100, 255, .08) !important;
  color:#409EFF;
  padding:5px 10px;
  border-radius: 5px;
  margin:5px 0;
}
.wzdataContent{
  font-size: 16px;
  line-height: 24px;
}
.el-descriptions-item__content {
  font-size: 14px;
}

.el-drawer__body {
  &::-webkit-scrollbar {
    width: 5px;
    height: 1px;
  }

  &::-webkit-scrollbar-thumb { /*滚动条里面小方块*/
    //border-radius: 10px;
    -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
    background: #999;
  }

  &::-webkit-scrollbar-track { /*滚动条里面轨道*/
    -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
    //border-radius: 10px;
    background: #fefefe;
  }
}
@media screen and (max-width: 500px) {
  .el-drawer{
    width:100% !important;
  }
}
</style>
<style scoped lang="less">
//如果是手机

.titletag {
  color: #fff;
  padding: 0 5px;
  font-size: 12px;
  height: 18px;
  line-height: 18px;
  border-radius: 3px;
  background: #409EFF;
  margin: 5px 5px 0 0;
}

.cover {
  font-size: 12px;
  color: #739099;
}

.reply-item {
  color: #409EFF;
  border-color: #c6e2ff;
  background-color: #ecf5ff;
  padding: 15px;
  margin: 10px 0;
  border-radius: 5px;

  &.delete_item {
    color: #999;
    border-color: #ddd;
    background-color: #eee;

    .headerLine {
      border-bottom: 1px solid #ddd !important;
    }
  }

  .headerLine {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #c6e2ff;

    .actionButton {
      cursor: pointer;
    }
  }

  .reply-user {
    font-weight: bold;
    padding-bottom: 5px;
    display: flex;


    .user .delete {
      background: red;
      color: #fff;
      padding: 2px 5px;
      margin-right: 5px;
      border-radius: 5px;
    }

    .t {
      font-weight: normal;
      color: #999;
      margin-left: 30px;
    }
  }
}

.titleH {
  .title {
    color: #20a0ff;
    font-size: 22px;
    font-weight: bold;

    &:hover {
      color: #369;
    }
  }
}
</style>
<script>
import store from '@/store'
import { mapGetters } from 'vuex'
import Exceltpl from '@/components/Exceltpl'
import Pagination from '@/components/Pagination'
import { getWzinfo, getWzlist, getWzParams, updateWzinfoParms } from '@/api/wz'
import { getPhone } from '@/api/user'


let id = 0
export default {
  components: {
    Pagination,
    Exceltpl
  },
  data() {
    return {
      hidden:{ip:true},
      actionform: [
      ],
      activeNames: ['1', '2'],
      actionloading: false,
      actionData: [],
      action: false,
      total: 0,
      list: [],
      hide:false,
      come_from_ary:[
        {label:'PC',value:1},
        {label:'小程序',value:2},
        {label:'WAP',value:3},
        {label:'征集',value:4},
        {label:'2025两会',value:5}
      ],
      drawer: true,
      checkLeaderData: [],
      checkLeader: [],
      listLoading: true,
      listQuery: {
        page: 1,
        limit: 20,
        c2: '',                    //领域
        type: '',                  //类别
        checktime: '',             //时间范围
        leader: '',                //领导
        status: '',                 //状态
        keyword: '',                //标题
        phone: '',                  //手机
        wid: '',                    //wid
        u_name: '',               //用户名
        r_name:'',               //回复人
        u_uid:'' ,                 //id
        evaluate_all:'',
        come_from:'',
        orderFiled:'',
        orderType:''
      },
      baseData: [],
      dialogVisible: false,
      dialogType: 'create',
      loading: false,
      value_loading: {
        endTime: false,
        is_zhanshi: false,
        status: false,
        export_status: false,
        myd_status: false,
        bkj_status: false
      }
    }
  },
  computed: {
    ...mapGetters([
      'roles',
    ])
  },
  created() {
    this.WzParams()
    let uid = this.$route.query.uid
    if (uid) {
      this.listQuery.u_uid =  uid
      this.fetchData()
    }else{
      this.fetchData()
    }
  },
  methods: {
    actionLeader(){
      updateWzinfoParms({
        action: 'updateleader',
        wid: this.actionData.wid,
        key: 'leader',
        value: this.actionform['leader']
      }).then(r => {

        this.$message({
          message: '更新成功',
          type: 'success'
        })
      })
    },
    hidefilter(){
      this.hide = !this.hide
    },
    lookPhone(type,id,key){
      getPhone({type:type,id:id}).then(r=>{
        this.$set(this.actionData,'phone',r.data)
      })
    },
    explortExcel(){
      this.$refs.exceltpl.explortExcel();
    },
    setEndTime(v) {
      this.$prompt('请输入延期理由', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        inputValue: ''
      }).then(({ value }) => {
        this.value_loading.endTime = true
        updateWzinfoParms({
          action: 'endTime',
          wid: this.actionData.wid,
          endTime_reason: value,
          endTime: this.actionform.endTime
        }).then(r => {
          this.value_loading.endTime = false
          this.$message({
            message: '更新成功',
            type: 'success'
          })
          this.fetchData()
        }, data => {
          this.value_loading.endTime = false
        })
      }).catch(() => {
        this.actionform.endTime = this.actionData.endTime
      })
    },
    updateParms(filed) {

      if (filed == 'status' || filed == 'is_zhanshi' || filed == 'bkj_status') {
        this.$confirm('此操作需要二次确认', '提示', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'warning'
        }).then(() => {
          this.value_loading[`${filed}`] = true
          updateWzinfoParms({
            action: 'filed',
            wid: this.actionData.wid,
            key: filed,
            value: this.actionform[`${filed}`]
          }).then(r => {
            this.value_loading[`${filed}`] = false
            this.$message({
              message: '更新成功',
              type: 'success'
            })
            this.fetchData()
          }, data => {
            // this.value_loadingm[`${filed}`] = false
          })
        }).catch(() => {
          if (filed == 'status') {
            this.actionform[`${filed}`] = '' + this.actionData[`${filed}`]
          }else if (filed == 'is_zhanshi') {
            this.actionform[`${filed}`] = this.actionData[`${filed}`]==2?true:false
          }else{
            this.actionform[`${filed}`] = this.actionData[`${filed}`]==1?true:false
          }
          console.log(this.actionData[`${filed}`])
        })
      } else {
        if (filed == 'export_status') {
          if(this.actionform[`${filed}`]){
            this.$prompt('请输入标记不导出理由', '提示', {
              confirmButtonText: '确定',
              cancelButtonText: '取消',
            }).then(({ value }) => {
              if(value=='' || !value){
                this.$message({
                  message: '请输入标记不导出理由',
                  type: 'warning'
                })
                this.actionform['export_status'] = false
                return false
              }
              this.value_loading['export_status'] = true
              updateWzinfoParms({
                action: 'filed',
                wid: this.actionData.wid,
                key: 'export_status',
                reason:value,
                value: this.actionform['export_status']
              }).then(r => {
                getWzinfo({ wid: this.actionData.wid }).then(response => {
                  this.$set(this.actionData,'export_status_reason',response.data.export_status_reason)
                  this.$set(this.actionData,'export_status',response.data.export_status)
                  this.$message({
                    message: '更新成功',
                    type: 'success'
                  })
                  this.value_loading['export_status'] = false
                })
              })
            }).catch(() => {
              this.actionform['export_status'] = false
            });
            return false
          }
        }
        this.value_loading[`${filed}`] = true
        updateWzinfoParms({
          action: 'filed',
          wid: this.actionData.wid,
          key: filed,
          value: this.actionform[`${filed}`]
        }).then(r => {
          getWzinfo({ wid: this.actionData.wid }).then(response => {
            this.actionData = response.data
            this.$message({
              message: '更新成功',
              type: 'success'
            })
            this.value_loading[`${filed}`] = false
          })
          // this.fetchData()
        }, data => {
          this.value_loading[`${filed}`] = false
        })
      }

    },
    delReply(reply_id, type, wid) {
      this.actionloading = true
      updateWzinfoParms({ action: 'reply_action', type: type, wid: wid, reply_id: reply_id }).then(r => {
        this.openAction(wid)
      })
    },
    search() {
      this.fetchData()
    },
    lookIp(){
      this.$set(this.hidden,'ip',false)
    },
    openAction(wid) {
      if(this.roles=='tongji'){
        window.open('https://wz.mala.cn/wz/wzinfo?wid='+wid)
        return false
      }
      this.$set(this.hidden,'ip',true)
      this.action = true
      this.actionData = []
      this.actionloading = true
      if (!isNaN(wid)) {
        getWzinfo({ wid: wid }).then(response => {
          this.actionData = response.data
          this.actionloading = false
          this.actionform = {
            status: '' + response.data.status + '',
            is_zhanshi: response.data.is_zhanshi,
            export_status: response.data.export_status > 0 ? true : false,
            type: response.data.type,
            classify1: response.data.classify1,
            classify2: response.data.classify2,
            is_index: response.data.is_index > 0 ? true : false,
            myd_status: response.data.myd_status > 0 ? true : false,
            bkj_status: response.data.bkj_status > 0 ? true : false,
            endTime: response.data.endTime,
            endTime_2: response.data.endTime_2,
            leader:response.data.leader_ary,
            endTime_reason: response.data.endTime_reason
          }
        })
      } else {
        this.$message({
          message: '识别出错，请点击右侧操作按钮',
          type: 'error'
        })
        return false
      }
    },
    goWid(wid) {
      this.$router.push({ path: '/wz/action', query: { wid: wid } })
    },
    refresh() {
      this.listQuery = {
        page: 1,
        limit: 20
      }
      localStorage.setItem('wzbaseData', '')
      this.fetchData()
      this.WzParams()
    },
    WzParams() {
      let baseData = localStorage.getItem('wzbaseData')
      if (!baseData) {
        getWzParams().then(response => {
          this.baseData = response.data
          localStorage.setItem('wzbaseData', JSON.stringify(this.baseData))
        })
      } else {
        this.baseData = JSON.parse(baseData)
      }
    },
    sortChange(column) {
      this.$set(this.listQuery,'orderType',column.order)
      this.$set(this.listQuery,'orderFiled',column.prop)
      // console.log(column.order)
      this.fetchData(column)
    },
    fetchData(column) {
      this.listLoading = true
      // if (column) {
      //   this.listQuery.orderFiled = column.prop
      //   this.listQuery.orderType = column.order
      // }
      getWzlist(this.listQuery).then(response => {
        this.list = response.data.data
        this.total = response.data.total
        this.listLoading = false
        if(this.listQuery.u_uid){
          this.listQuery.u_name = response.data.data[0].u_name
        }
      })
    },
    submit() {

    }
  }
}
</script>
